﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    /// <summary>
    /// 组织机构基础实体类
    /// </summary>
    public class SysOrgOrganizations
    {
        /// <summary>组织机构id</summary>
        public int organization_id { get; set; }

        /// <summary>组织名称</summary>
        public string organization_name { get; set; }

        /// <summary>排序</summary>
        public int sorting { get; set; }

        /// <summary>状态</summary>
        public string status { get; set; }

        /// <summary>创建人</summary>
        public string create_by { get; set; }

        /// <summary>创建时间</summary>
        public DateTime? create_time { get; set; }

        /// <summary>修改人</summary>
        public string update_by { get; set; }

        /// <summary>修改时间</summary>
        public DateTime? update_time { get; set; }

        /// <summary>是否删除</summary>
        public string is_delete { get; set; }

        /// <summary>组织编号</summary>
        public string org_code { get; set; }

        /// <summary>父级id</summary>
        public int? parent_organization_id { get; set; }
    }


    /// <summary>
    /// 部门树形结构DTO
    /// </summary>
    public class OrganizationTreeDto
    {
        /// <summary>
        /// 部门ID（存储用）
        /// </summary>
        public int OrganizationId { get; set; }

        /// <summary>
        /// 部门名称（显示用）
        /// </summary>
        public string OrganizationName { get; set; }


        public int ParentOrganizationId { get; set; } //父级部门ID

        /// <summary>
        /// 子部门列表
        /// </summary>
        public List<OrganizationTreeDto> Children { get; set; } = new List<OrganizationTreeDto>();
    }


}
